<?php

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{

    protected function _initAutoLoader() {
        $autoloader = Zend_Loader_Autoloader::getInstance ();
        $autoloader->registerNamespace("UndeadStudents");
        return $autoloader;
    }
    
    protected function _initViews() {
        $this->bootstrap('view');
        $view = $this->getResource('view');
        $view->doctype('XHTML1_STRICT');
        $view->headTitle('Undead Students - Counteúdo Underground da UFRJ')->setSeparator(' | ');
        $view->headMeta()->appendHttpEquiv('Content-Type', 'text/html; charset=UTF-8');
        Zend_Registry::set('view', $view);
    }
    
    protected function _initConfig() {
        $config = new Zend_Config_Ini(APPLICATION_PATH . '/configs/application.ini', APPLICATION_ENV);
        Zend_Registry::set('config', $config);
    }
    
    protected function _initPlugins() {
        
        $bootstrap = $this->getApplication();
        
        if ($bootstrap instanceof Zend_Application) {
            $bootstrap = $this;
        }
        
        $bootstrap->bootstrap('FrontController');
        $front = $bootstrap->getResource('FrontController');

        $front->registerPlugin(new UndeadStudents_Plugins_Layout());
    }


}

